package array1.array02;
//案例2： 定义一个数组  求数组里面所有元素的和。int[] arr = {6,7,4,3,9,5,7,8};
public class demo3 {
    public static void main(String[] args) {
        int count=0;
        int arr[]=new int[]{6,7,4,3,9,5,7,8};
        for (int i=0;i<arr.length;i++){
            count+=arr[i];
        }
        System.out.println(count);
    }
}
